<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>GovOfficeRegion</title>
</head>
<body>
	<table border="1">
		<caption>List Gov Office Region</caption>
		<tr>
			<th>Gov Office Region Name</th>
			<th>Description</th>
			<th>County</th>
			<th>Is-Active?</th>
			<th>&nbsp;</th>
		</tr>
		<s:iterator value="allGov" status="stt">
			<tr>
				<td><s:property value="govOfficeRegionName" /></td>
				<td><s:property value="description" /></td>
				<td><s:iterator value="counties" status="stt1">
						<s:property value="countyName" />
						<br>
					</s:iterator></td>
				<td>
					<s:if test="%{isActive==1}">Yes</s:if>
					<s:else>No</s:else>
				</td>
				<td></td>

			</tr>
		</s:iterator>
	</table>
<s:url action="getAllGovOffice" var="urlPage1">
    <s:param name="page"><s:if test="page > 1"><s:property value="page-1"/></s:if><s:else><s:property value="page"/></s:else></s:param>
</s:url>
<s:url action="getAllGovOffice" var="urlPage2">
    <s:param name="page"><s:if test="page = totalPage"><s:property value="page"/></s:if><s:elseif test="page = 0"><s:property value="page+2"/></s:elseif><s:else><s:property value="page+1"/></s:else></s:param>
</s:url>
<s:url action="getAllGovOffice" var="urlPageLast">
    <s:param name="page"><s:property value="totalPage" /></s:param>
</s:url>
<a href="getAllGovOffice">First</a>
 <a href="<s:property value="urlPage1"/>">Prev</a> 
page <s:property value="currentPage"/> of <s:property value="totalPage"/>
<a href="<s:property value="urlPage2"/>">Next</a>
<a href="<s:property value="urlPageLast"/>">Last</a>
</body>
</html>